package com.lzw.breezeNovel.webApp.mapper.video;

import com.lzw.breezeNovel.model.entity.pojo.video.Anime;
import com.lzw.breezeNovel.model.entity.query.Search;
import com.lzw.breezeNovel.model.entity.query.video.CategoryQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 清风明月
 * @Package com.lzw.breezeNovel.webApp.mapper.video
 * @date 2025/3/18
 * @description
 */
@Mapper
@SuppressWarnings("all")
public interface AnimeMapper {

    /**
     * 查询数量
     * @return
     */
    @Select("select count(*) from anime")
    Long selectCount();

    /**
     * 分页查询
     * @param startPage
     * @param size
     * @return
     */
    List<Anime> selectAnime(int startPage, Integer size);

    /**
     * 分类获取动漫
     * @param categoryQuery
     * @return
     */
    List<Anime> SelectCategoryData(CategoryQuery categoryQuery);

    /**
     * 搜索数据
     * @param search
     * @return
     */
    List<Anime> search(Search search);

    /**
     * 获取相关动漫
     *
     * @param type
     * @param videoId
     * @return
     */
    List<Anime> selectRelatedAnime(String type, Integer videoId);
}
